from flask import Flask
from flask_cors import CORS
from models.user_model import db
from views.user_bp import user_bp


def create_app(config):
    app=Flask(__name__)

    app.config.from_object(config)

    cors=CORS(app)

    db.init_app(app)

    app.register_blueprint(user_bp)
    return app